package com.d3works.apps.message.service;

import com.d3works.apps.message.db.EmailAccount;
import com.d3works.exception.D3worksException;
import com.d3works.mail.MailAccount;
import java.io.IOException;
import javax.mail.MessagingException;

public interface MailAccountService {

  public void checkDefaultMailAccount(EmailAccount mailAccount) throws D3worksException;

  public EmailAccount getDefaultSender();

  public EmailAccount getDefaultReader();

  public void checkMailAccountConfiguration(EmailAccount mailAccount)
      throws D3worksException, MessagingException;

  public String getSecurity(EmailAccount mailAccount);

  public String getProtocol(EmailAccount mailAccount);

  public String getSignature(EmailAccount mailAccount);

  public String getEncryptPassword(String password);

  public String getDecryptPassword(String password);

  public int fetchEmails(EmailAccount mailAccount, boolean unseenOnly)
      throws MessagingException, IOException;

  public MailAccount getMailAccount(EmailAccount mailAccount);
}
